#include <iostream>
#include <unistd.h>
#include <cstdlib>
#include <signal.h>
#include <sys/types.h>
#include <string>

using namespace std;

int main(int argc, char* argv[])
{
    if(argc != 3) {
        cout << "error!" << endl;
        exit(1);
    }
    int sigNum = stoi(argv[1]);
    pid_t pid = stoi(argv[2]);
    int n = kill(pid, sigNum);
    if(n == -1) {
        perror("kill");
        exit(2);
    }
    return 0;
}